package lab02.test14;

/**
 * Created by lenovo on 2017/10/20.
 */
public class Circle extends Shape {
    double radius;
    final double PI = 3.1415926;

    public Circle() {
    }

    public Circle(double radius) {
        this.radius = radius;
    }

    @Override
    public double getArea() {

        return PI * radius * radius;
    }

    public void print() {
        System.out.println("圆的半径为：" + radius);
        System.out.println("面积为：" + getArea());
    }
}
